home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1320 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: void pointers
  5. Date: Sat, 13 Jan 96 01:08:02 GMT
  6. Organization: none
  7. Message-ID: <821495282snz@genesis.demon.co.uk>
  8. References: <1996Jan12.133322.1@ccc.govt.nz> <4d6h8k$p6u@axe.netdoor.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4d6h8k$p6u@axe.netdoor.com>
  15.            esargent@netdoor.com "Eric Sargent" writes:
  16.  
  17. >void (char, etc..)      *clipPP;
  18. >
  19. >getFence(&clipPP);              (may need to be cast if not a void pointer)
  20.  
  21. This falls into the trap! :-)
  22.  
  23. A void ** may only portably point to a void *. Trying to make it point
  24. to anything else, even with a cast, results in undefined (or at best
  25. implementation defined) behaviour. void ** is not a generic pointer to
  26. pointer, it is simply a pointer to a void * object.
  27.  
  28. -- 
  29. -----------------------------------------
  30. Lawrence Kirby | fred@genesis.demon.co.uk
  31. Wilts, England | 70734.126@compuserve.com
  32. -----------------------------------------
  33.